<?php

//Parameters that should be provided to the partial view
//'status' => $status,
//'avatarBaseURL' => $this->avatarBaseURL,
//'userId' => $this->userId


//used multiple times (for the picture, pseudo) so we calculate it once
$authorURL = $this->baseURL().'/status/user/'.$this->status['user']['pseudo'].'/';
?>


<li class="status" id="status<?php echo $this->status['id'] ?>">
	<a href="<?php echo $authorURL ?>"><img src="<?php echo $this->avatarBaseURL.$this->status['user']['pseudo'].'.gif' ?>" class="avatarImage" alt="<?php echo $this->status['user']['pseudo'] ?>" width="44px" height="44px"  /></a>
	<div class="details">
		<span class="author"><a href="<?php echo $authorURL ?>"><?php echo $this->status['user']['pseudo'] ?></a></span>
		
		<?php
		if($this->status['private']) echo '<span class="private"></span>';
		?>
		
		<span class="text"><?php echo $this->statusFormatter($this->status['status']) ?></span>
		<span class="date">
		<a href="<?php echo $this->baseURL().'/status/o/'.$this->status['id'].'/' ?>">
		<?php echo $this->dateFormatter($this->status['publishedTime']); ?>
		</a>
		</span>
		<?php
			//If the user is owner of the status, he can delete it
			if($this->status['user']['id'] == $this->userId) echo '<span class="deleteStatus"><a href="'.$this->baseURL().'/status/status/delete/id/'.$this->status['id'].'/">Delete</a></span>';
		?>
	</div>
	
</li>